import request from '@/axios'
import type {
  TranslationListResponse,
  EditTranslationParams,
  EditTranslationResponse
} from './types'

// 获取翻译列表
export const getListApi = (params: Record<string, any>) => {
  return request.get<TranslationListResponse>({
    url: '/admin/translate',
    params
  })
}

// 编辑翻译
export const editListApi = (params: EditTranslationParams) => {
  return request.put<EditTranslationResponse>({
    url: '/admin/translate',
    data: params
  })
}
